import { useRoutes } from 'react-router-dom'
import Home from '../views/Home'
import Reducer from '../views/Reducer/index.jsx'
import Error from '../views/Error'
const RouterView = () => {
    const routes = useRoutes(
        [
            {
                path: '/',
                element: <Home />
            },
            {
                path: '/reducer',
                element: <Reducer />
            },
            {
                path: '*',
                element:<Error/> 
            }
        ])
    return routes
}
export default RouterView